<template>
  <div class='condition first-box'>
    <List :listData="listData"></List>
  </div>
</template>
<script>
import List from "./common/list";
export default {
  components: {
    List
  },
  name: "",
  data() {
    return {
      listData:[
        { 
          id:1,
          userId:2,
          carOwner:"",
          carNum:"",
          checkType:"",
          score:"",
        }
      ]
    };
  },
  methods: {
    getList(){
      var that=this
      var params={
        // userId:sessionStorage.getItem("userId")
      }
      async function list() {
        await _g.apiPost("trafficReport/init.do",params).then(res=>{
          var goal=[]
          goal.push({
            id:res.data.vehicle?res.data.vehicle.id:"暂无",
            userId:res.data.vehicle?res.data.vehicle.userId:"暂无",
            carOwner:res.data.vehicle?res.data.vehicle.name:"暂无",
            carNum:res.data.vehicle?res.data.vehicle.plateNum:"暂无",
            checkType:res.data.type||"暂无",
            score:res.data.score||"0",
          })
          that.$set(that,"listData",goal)

          var carInfo=JSON.stringify(res.data.vehicle)

          sessionStorage.setItem("carInfo",carInfo)
        })
      }
      list()
    }
  },
  created() {
    this.getList()
  }
};
</script>
<style lang="scss" scoped>
.condition {
  
}
</style>